﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AutoInsurance
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Label1.Text = "Здравствуйте, " + Session["name"] + Session["surname"];

            //string role = Request.QueryString["id"];
            try
            {//смотрим роль менеджера
                string role = Session["role"].ToString();
                if (role == "1" /*|| role == "2"*/)
                {
                    HyperLink3.Visible = false;
                }
                else if (role == "5" || role == "2")
                {
                    HyperLink3.Visible = true;
                }
                else
                {
                    HyperLink1.Visible = false;
                    HyperLink2.Visible = false;
                    HyperLink3.Visible = false;
                    HyperLink5.Visible = false;
                }
            }

            catch (Exception ex)
            {
                HyperLink1.Visible = false;
                HyperLink2.Visible = false;
                HyperLink3.Visible = false;
                HyperLink5.Visible = false;
            }
        }
    }
}
